import request from "@/utils/request.js";
const baseUrl = '/cloud-sys-service/exam-question-group'

/**
 * 分页查询考试题库组
 */
export function page(data) {
  return request({
    url: baseUrl + '/page',
    method: 'post',
    data
  })
}

/**
 * 通过id查询考试题库组
 */
export function getById(params) {
  return request({
    url: baseUrl + '/getById',
    method: 'get',
    params
  })
}

/**
 * 新增考试题库组
 */
export function add(data) {
  return request({
    url: baseUrl + '/add',
    method: 'post',
    data
  })
}

/**
 * 通过id修改考试题库组
 */
export function update(data) {
  return request({
    url: baseUrl + '/updateById',
    method: 'post',
    data
  })
}

/**
 * 新增或修改考试题库组记录
 */
export function save(data) {
  return request({
    url: baseUrl + '/saveOrUpdate',
    method: 'post',
    data
  })
}

/**
 * 通过id删除考试题库组记录
 */
export function removeById(id) {
  return request({
    url: baseUrl + `/removeById?id=${id}`,
    method: 'get'
  })
}

// 列表相关列信息
export const columnInfo = [
  {
    "title":"序号",
    "type":"seq",
    "fixed":"left",
    "align":"center",
    "width":"60"
  },
  {
    "type":"checkbox",
    "fixed":"left",
    "align":"center",
    "width":"60"
  },
  {
    "title":"分组名称",
    "field":"name",
    "align":"center",
    "proxyColumn":true,
    "minWidth":"100"
  },
  {
    "title":"创建时间",
    "field":"createTime",
    "align":"center",
    "minWidth":"100"
  },
  {
    "title":"创建人",
    "field":"createByTxt",
    "align":"center",
    "minWidth":"100"
  },
  {
    "title":"操作",
    "field":"operate",
    "fixed":"right",
    "align":"center",
    "proxyColumn":true,
    "minWidth":"120px",
    /*"options":[
        {
            "text":true,
            "btnName":"重置密码",
            "type":"primary",
            "icon":"RefreshLeft",
            "method":"showFormDialog"
        },
    ]*/
  }
]